﻿using Hong.IRepository.IRepository_SystemSettings;
using Hong.Model.Dto.PesponseDto.ResponseModel.ResultModel;
using Hong.Model.SysDomain.Model_SystemSettings;
using Hong.Model.SysDomain.Model_SystemSettings.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hong.Business.Business_SystemSettings
{
    public class PersonnelBll
    {
        #region 构造器业务注入

        private readonly IPersonnelDal  _personnelDal;

        public PersonnelBll(IPersonnelDal  personnelDal)
        {
            _personnelDal = personnelDal;
        }

        #endregion

        #region 人员管理

        #region 添加人员
        public async Task<ResponseModel<bool>> AddPer(Personnel personnel)
        { 
            return await _personnelDal.AddPer(personnel);
        }
        #endregion

        #region 加载人员
       public async Task<PageResponse<PersonnelModel>> GetPer(int? depId, string PersonnelName, int pageindex, int pagesize)
        { 
            return await _personnelDal.GetPer(depId, PersonnelName, pageindex, pagesize);
        }
        #endregion

        #endregion

        #region 人员删除
        public async Task<ResponseModel<bool>> DelPer(Guid PersonnelId)
        { 
            return await _personnelDal.DelPer(PersonnelId);
        }
        #endregion
    }
}
